import java.util.Scanner;

/**
 * DomWon
 * Created with Intellij IDEA.
 * Description:
 * User:WEI
 * Date:2023/3/5
 * Time:8:25
 */
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        double c = scan.nextDouble();
        double d = scan.nextDouble();
        double e = scan.nextDouble();
        int sum1 = add(a,b);
        double sum2 = add(c,d,e);
        System.out.println(sum1);
        System.out.println(sum2);
    }

    public static int add(int a,int b) {
        return (a+b);
    }

    public static double add(double c,double d,double e) {
        return (c+d+e);
    }

    public static void main8(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        double c = scan.nextDouble();
        double d = scan.nextDouble();
        double e = scan.nextDouble();
        int ret = max(a,b);
        double tmp = max(c,d,e);
        System.out.println(ret);
        System.out.println(tmp);
    }

    public static int max(int a,int b) {
        if (a > b) {
            return a;
        } else {
            return b;
        }
    }

    public static double max(double c,double d,double e) {
        double ret = 0.0;
        if (c > d) {
            ret = c;
        } else {
            ret = d;
        }

        if(ret > e) {
            return ret;
        } else {
            return e;
        }
    }

    public static void main7(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int ret = Fobi(n);
        System.out.println(ret);
    }

    public static int Fobi(int n) {
        if(n < 3) {
            return 1;
        } else {
            return (Fobi(n-1)+Fobi(n-2));
        }
    }

    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0;
        for (int i = 1; i <=n ; i++) {
            int ret = 1;
            for (int j = 1; j <= i ; j++) {
                ret *= j;
            }
            sum += ret;
        }
        System.out.println(sum);
    }

    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int ret = 1;
        for (int i = 1; i <= n; i++) {
            ret *= i;
        }
        System.out.println(ret);
    }

    public static void main4(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int max = max3(a,b,c);
        System.out.println(max);
    }

    public static int max3(int a,int b,int c) {
        int ret = max2(a,b);
        int tmp = max2(ret,c);
        return tmp;
    }

    public static int max2(int a,int b) {
        if(a > b) {
            return a;
        } else {
            return b;
        }
    }

    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextInt()) {
            int n = scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    if((i==j)||(i+j)==(n-1)) {
                        System.out.print("*");
                    } else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }

    public static void main2(String[] args) {
        double sum = 0.0;
        int flag = 1;
        for (int i = 1; i <= 100; i++) {
            sum += flag * (1.0/i);
            flag = -flag;
        }
        System.out.println(sum);
    }

    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        String a = scan.next();
        if(a.equals("A")) {
            System.out.println("优秀");
        } else if(a.equals("B")) {
            System.out.println("良好");
        } else if(a.equals("C")) {
            System.out.println("及格");
        } else if(a.equals("D")) {
            System.out.println("不及格");
        } else {
            System.out.println("未知等级");
        }
    }
}
